// haxzsAudio Server
// created by omghaxzs
// 2010

#include "main.h"
#include "client_manager.h"

logwnd *l;
clientwnd *clwnd;
sourcewnd *srcwnd;
boost::asio::io_service io_service;
settings *setting;
client_manager *manager;

using namespace std;


// Prototypes
void createWindows();

// GO
int main (int argc, char *argv[])
{
	// Initialize windows
	window::setup();

	// Create our windows
	createWindows();

	// Initialize settings
	setting = new settings();
	
	// Create our client manager
    manager = new client_manager(&io_service, 1000, 1000);
    manager->start();
	return 0;
}

void createWindows()
{
	// Create our logo window
	window *logo = new window(LINES-1, 0, 19, 1);

	// Fill in all the info about it
	logo->color(1);
	logo->centerMsg(0, 0, 19, "haxzs Audio Server ");
	logo->clrcolor(1);

	// Create our log window
	l = new logwnd(0, 0, COLS, LINES-1);

	// Create our client status window
	//clwnd = new clientwnd(LINES-10, 0, 25, 10);

	// Create our source status window
	//srcwnd = new sourcewnd(LINES-10, 25, 25, 10);
}
